import cv2

image = cv2.imread("./test1.jpg");

gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY); # 获取灰度图

corners = cv2.goodFeaturesToTrack(gray,500,0.1,10) # 获取拐角列表

for corner in corners : # 标记每一个拐角
    x,y = corner.ravel(); # 获取x y

    cv2.circle(image,(int(x),int(y)),3,(255,0,255),-1) # 标记

cv2.imshow("corners",image)
cv2.waitKey()